import { Component, OnInit } from '@angular/core'
import { Observable } from 'rxjs'

import { PageService } from '@shared/services/page.service'
import { ETabScrollStatus, EBizLevel } from '@shared/enums'
import { IBiz } from '@shared/interfaces/biz'
import { DepositDataService } from '../../deposit-data.service'

@Component({
  selector: 'app-deposit-detail-tab-biz',
  templateUrl: './tab-biz.component.html',
})
export class DepositDetailTabBizComponent implements OnInit {
  constructor(
    private dataService: DepositDataService,
    private pageService: PageService,
  ) {}

  bizLevel = EBizLevel.Terminal
  bizInfo: Observable<IBiz>

  ngOnInit() {
    this.bizInfo = this.dataService.depositDetail$.value$
    this.pageService.setTabScrollStatus(ETabScrollStatus.Scroll)
  }
}
